package com.infoland.afanmall.model.my.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatImageView;
import android.support.v7.widget.LinearLayoutCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.CheckBox;
import android.widget.TextView;

import com.infoland.afanmall.R;
import com.infoland.afanmall.base.util.ToolsKit;
import com.infoland.afanmall.model.my.adapter.ShouCAdapter;
import com.infoland.afanmall.model.my.entity.ShouCEntity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TuiKuanActivity extends AppCompatActivity {


    @BindView(R.id.shou_cang_recy)
    RecyclerView shouCangRecy;
    @BindView(R.id.shou_cang_back)
    AppCompatImageView shouCangBack;
    @BindView(R.id.shou_cang_bianji)
    TextView shouCangBianji;
    @BindView(R.id.shou_cang_check_all)
    CheckBox shouCangCheckAll;
    @BindView(R.id.shou_cang_qu_guan)
    TextView shouCangQuGuan;
    @BindView(R.id.cart_foot)
    LinearLayoutCompat cartFoot;
    List<ShouCEntity> entityList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.order_status_activity);
        ButterKnife.bind(this);
        initData();

    }

    private void initData() {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext());
        shouCangRecy.setLayoutManager(linearLayoutManager);
        shouCangRecy.setAdapter(new ShouCAdapter(R.layout.shou_cang_item, getData(), getApplicationContext()));
    }

    private List getData() {
        entityList = new ArrayList<>();
        entityList.add(new ShouCEntity());
        entityList.add(new ShouCEntity());
        entityList.add(new ShouCEntity());
        entityList.add(new ShouCEntity());
        entityList.add(new ShouCEntity());
        entityList.add(new ShouCEntity());
        return entityList;
    }

    @Override
    protected void onDestroy() {
        ToolsKit.deleteOKHttp(this);
        super.onDestroy();
    }

}
